<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<div class="t_bar">
	<span class="color_red">*</span>项目人员列表
	<span style="font-size: 12px;font-weight: normal;">
		（如果您需要修改申请人信息， 请保存申请书后点击菜单"管理">"个人信息维护"完成修改）
	</span>
</div>
	<table  id="zh_persons" border="0" cellspacing="0" cellpadding="0" class="table01" >
		<thead>
			<tr>
                <th width="7%">选择</th>
                <th nowrap>序号</th>
				<th width="13%">姓名</th>
				<th width="11%">证件类型</th>
				<th width="11%">证件号码</th>
				<th width="10%">电子邮箱</th>
				<th width="10%">手机</th>
				<th width="9%" nowrap="nowrap">职称</th>
				<th width="20%">单位名称</th>
				<th width="10%">项目分工</th>
			</tr>
		</thead>
		<tbody id="tab">
			<tr style="display: none">
				<td  align="center"  width="50px" >
					<input type="radio" name="sel_zh_persons" onclick="setSubmitPsn()" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|ethnicity_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|ethnicity_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|region_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|region_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|birthday" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|card_type_value" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|academician_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|academician_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|org_code" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|contact|tel_work" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|contact|fax" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|post_code" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_country_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_country_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_college" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_year" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|position" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|address" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|prof_title_value" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|post_doctor_value"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|post_doctor_name"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|birth_date"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|gender_value"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|age"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|educate_value"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|educate_name"/>
					<input type="hidden" name="zh_persons|zh_person[0]|iscomember" value="0"/>
					<input type="hidden" name="zh_persons|zh_person[0]|researches" label="xml"/>
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]@seq_no">[index]</span>
				</td>
				<td>
					<span name="zh_persons|zh_person[0]|basic_info|zh_name"></span>
				</td>
				<td>
					<span name="zh_persons|zh_person[0]|basic_info|card_type_name"></span>
				</td>
				<td>
					<span name="zh_persons|zh_person[0]|basic_info|card_code"></span>
				</td>
				<td>
					<span name="zh_persons|zh_person[0]|contact|email" ></span>
				</td>
				<td>
					<span name="zh_persons|zh_person[0]|contact|mobile" ></span>
				</td>
				<td>
					<span name="zh_persons|zh_person[0]|basic_info|prof_title_name"></span>
				</td>
				<td>
					<span  name="zh_persons|zh_person[0]|basic_info|org_name" ></span>
				</td>
				<td>
					<span name="zh_persons|zh_person[0]|basic_info|work" ></span>
				</td>
			</tr>
			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/zh_persons/zh_person" var="zh_person">
				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td  align="center"  width="50px" >
						<input type="radio" name="sel_zh_persons" onclick="setSubmitPsn()" /> 
						<c:if test="${index==0}">
							<input type="hidden" id="submit_psn" name="zh_persons/zh_person[${flag}${index}]@submit_psn" value="1" />
							<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/psn_code" value="<x:out select="$zh_person/basic_info/psn_code" />"/>
						</c:if>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/en_name" value="<x:out select="$zh_person/basic_info/en_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/ethnicity_value" value="<x:out select="$zh_person/basic_info/ethnicity_value" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/ethnicity_name" value="<x:out select="$zh_person/basic_info/ethnicity_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/region_value" value="<x:out select="$zh_person/basic_info/region_value" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/region_name" value="<x:out select="$zh_person/basic_info/region_name" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_value" value="<x:out select="$zh_person/basic_info/gender_value" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/birthday" value="<x:out select="$zh_person/basic_info/birthday" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/card_type_value" value="<x:out select="$zh_person/basic_info/card_type_value" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/academician_value" value="<x:out select="$zh_person/basic_info/academician_value" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/academician_name" value="<x:out select="$zh_person/basic_info/academician_name" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/org_code" value="<x:out select="$zh_person/basic_info/org_code" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/tel_work" value="<x:out select="$zh_person/contact/tel_work" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/fax" value="<x:out select="$zh_person/contact/fax" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_value" value="<x:out select="$zh_person/basic_info/degree_value" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_name" value="<x:out select="$zh_person/basic_info/degree_name" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_code" value="<x:out select="$zh_person/basic_info/post_code" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_country_value" value="<x:out select="$zh_person/basic_info/degree_country_value" />" /> 
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_country_name" value="<x:out select="$zh_person/basic_info/degree_country_name" />" /> 
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_college" value="<x:out select="$zh_person/basic_info/degree_college" />" /> 
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_year" value="<x:out select="$zh_person/basic_info/degree_year" />" /> 
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_value" value="<x:out select="$zh_person/basic_info/prof_title_value" />" /> 
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/address" value="<x:out select="$zh_person/basic_info/address" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/position" value="<x:out select="$zh_person/basic_info/position" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_doctor_value" value="<x:out select="$zh_person/basic_info/post_doctor_value" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_doctor_name" value="<x:out select="$zh_person/basic_info/post_doctor_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/age" value="<x:out select="$zh_person/basic_info/age" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/educate_value" value="<x:out select="$zh_person/basic_info/educate_value" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/educate_name" value="<x:out select="$zh_person/basic_info/educate_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/iscomember" value="0"/>
						
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/researches" label="xml"/>
					</td>
					<td align="center">
					<span name="zh_persons/zh_person[${flag}${index}]@seq_no">${index+1}</span>
					</td>
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/zh_name"><x:out select="$zh_person/basic_info/zh_name" /></span>
					</td>
					
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/card_type_name"><x:out select="$zh_person/basic_info/card_type_name" /></span>
					</td>
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/card_code"><x:out select="$zh_person/basic_info/card_code" /></span>
					</td>
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/contact/email"><x:out select="$zh_person/contact/email" /></span>
					</td>
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/contact/mobile"><x:out select="$zh_person/contact/mobile" /></span>
					</td>
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_name"><x:out select="$zh_person/basic_info/prof_title_name" /></span>
					</td>
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/org_name"><x:out select="$zh_person/basic_info/org_name" /></span>
					</td>
					<td>
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/work"><c:choose><c:when test="${index==0}">项目负责人</c:when><c:otherwise><x:out select="$zh_person/basic_info/work" /></c:otherwise></c:choose></span>
					</td>
					
				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			</tbody>
	</table>
<br>
	<table border="0" cellpadding="0" cellspacing="1">
		<tr>
			<td>
				<c:set var="prjCode"><x:out select="$xmlData/data/proposal/prj_code" /></c:set>
				<c:if test="${empty prjCode}" ><c:set var="prjCode" value="" ></c:set></c:if>
				<%-- <input class="button_02" type="button" value="导入参与人" onclick="if(checkTabLimit('zh_persons',10,'中方人员最多只能填写10条')){addNewRow('zh_persons','${ctx}/proposal/sel-his-psn?flag=init&prjCode=${prjCode}&parentTab=zh_persons&type=add&TB_iframe=true&height=440&width=900','添加参与人');}try{top.resizeFrame();}catch(e){};" /> --%>
				<input class="button_02" type="button" value="添加" onclick="if(checkTabLimit('zh_persons',10,'项目参与人员最多只能填写10条')){addNewRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_zdzx?parentTab=zh_persons&type=add&needMeetingInfo=${param.needMeetingInfo}&TB_iframe=true&height=440&width=900','添加项目参与人');}try{top.resizeFrame();}catch(e){};">
				&nbsp;<input class="button_02"  id="zh_psnPrev" type="button" value="上移" onclick="movePrev('zh_persons');setSubmitPsn()">
				&nbsp;<input class="button_02"  id="zh_psnNext" type="button" value="下移" onclick="moveNext('zh_persons');setSubmitPsn()">
				&nbsp;<input class="button_02"  id="zh_psnEdit" type="button" value="编辑" onclick="if(checkSubmitPsn('zh_persons'))editRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_zdzx?parentTab=zh_persons&type=edit&needMeetingInfo=${param.needMeetingInfo}&TB_iframe=true&height=440&width=900','编辑项目参与人信息')">
				&nbsp;<input class="button_02"  id="zh_psnDel" type="button" value="删除" onclick="deleteSelectedRow('zh_persons','中方人员',1,'申请人不能被删除');">
			</td>
		</tr>
	</table>
<br/>
<table class="t_css" width="100%" border="0" cellpadding="0" id="prpInfo"
	cellspacing="1">
	<tr>
		<td colspan="9" class="t_bar"><span>本项目完成后经济效益预测</span></td>
	</tr>
	
	<tr class="li_2">
		<td align="right"><span class="color_red">*</span>项目分类：</td>
		<td colspan="8" align="left"> 
			<input type="radio" id="prpsort_01" name="prpsort"  value="01" class="do "  
					onclick="initControlValue(this.id);updateCheckVal(this.id,'prpsort');" label="专题一"  />专题一&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" id="prpsort_02" name="prpsort" value="02" class="do "  
					onclick="initControlValue(this.id);updateCheckVal(this.id,'prpsort');" label="专题二"  />专题二&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" id="prpsort_03" name="prpsort"  value="03" class="do "  
					onclick="initControlValue(this.id);updateCheckVal(this.id,'prpsort');" label="专题三"  />专题三&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" id="prpsort_04" name=prpsort value="04" class="do "  
					onclick="initControlValue(this.id);updateCheckVal(this.id,'prpsort');" label="专题四"  />专题四&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="hidden" name="proposal/basic/prpsort_value" id="prpsort_value" label="项目分类" class="required" 
					value="<x:out select="$xmlData/data/proposal/basic/prpsort_value" />">
			<input type="hidden" name="proposal/basic/prpsort_label" id="prpsort_label"label="项目分类" 
					value="<x:out select="$xmlData/data/proposal/basic/prpsort_label" />">
		</td>
	</tr>
	
	<tr class="li_1">
		<td colspan="2" align="right"><span class="color_red">*</span>年新增产值：</td>
		<td colspan="1">
			<input id="zh_title" name="proposal/goal/rate" label="年新增产值" type="text"  onfocus="InitInput.setNumber(this,7,2,2)" 
					class="input_css required maxlength:50"  style="width:100px;vertical-align: center" maxlength="12" 
					value="<x:out select="$xmlData/data/proposal/goal/rate" />" /><span style="vertical-align: center"">万元 </span>
		</td>
		<td  align="right"><span class="color_red">*</span>年新增利税：</td>
		<td colspan="1">
			<input id="zh_title" name="proposal/goal/tax" label="年新增利税" type="text"  onfocus="InitInput.setNumber(this,7,2,2)" 
					 class="input_css required maxlength:50"  style="width:100px;vertical-align: center" maxlength="12" 
					 value="<x:out select="$xmlData/data/proposal/goal/tax" />" /><span style="vertical-align: center"">万元 </span>
		</td>
	
		<td  align="right"><span class="color_red">*</span>年出口创汇：</td>
		<td colspan="1">
			<input id="zh_title" name="proposal/goal/output" label="年出口创汇" type="text"  onfocus="InitInput.setNumber(this,7,2,2)" 
					class="input_css required maxlength:50"  style="width:100px;vertical-align: center" maxlength="12" 
					value="<x:out select="$xmlData/data/proposal/goal/output" />" /><span style="vertical-align: center"">万美元 </span>
		</td>
	</tr>
</table>

<div class="t_bar">主要研究开发内容、要达到的主要技术、经济指标以及将提供的研究开发成果及形式<span style="font-size: 12px;font-weight: normal;">(提示:此项内容将作为项目立项后任务书的考核指标)</span></div>
   <table class="t_css" width="100%" border="0" cellpadding="0"
	    cellspacing="1">
      <tr class="li_1">
          <td align="left"><span class="color_red">*</span><strong>1、主要研究开发内容</strong>（限1000字）</td>
      </tr>
      <tr class="li_2">
          <td>
			<textarea rows="7" cols="150"  class="input_textarea required" onfocus="InitInput.setMaxLength(this,1000)"  name='proposal/goal/summary1'  label="项目主要研究开发内容"><x:out select="$xmlData/data/proposal/goal/summary1"/></textarea>
		  </td>
      </tr>
      <tr class="li_1">
          <td align="left"><span class="color_red">*</span><strong>2、要达到的主要技术、经济指标</strong>（限1000字）</td>
      </tr>
      <tr class="li_2">
          <td>
			<textarea rows="7" cols="150" name='proposal/goal/summary2' class="input_textarea required" onfocus="InitInput.setMaxLength(this,1000)"   label="项目要达到的主要技术、经济指"><x:out select="$xmlData/data/proposal/goal/summary2"/></textarea>
	      </td>
      </tr>
      <tr class="li_1">
          <td align="left"><span class="color_red">*</span><strong>3、将提供的研究开发成果及形式</strong>（限1000字）</td>
      </tr>
      <tr class="li_2">
         <td>
			<textarea rows="7" cols="150" name='proposal/goal/summary3'  onfocus="InitInput.setMaxLength(this,1000)"  class="input_textarea required"   label="项目将提供的研究开发成果及形式"><x:out select="$xmlData/data/proposal/goal/summary3"/></textarea>
		</td>
      </tr>
      <tr class="li_1">
    </table>

<script type="text/javascript">
$(function(){
	
	//将申请书xml中的研究领域xml字符串设置到每个人的对应隐藏域
	//setPsnResearch("zh_persons", "xmlStr", "zh_person");
});
//比较2个数大小 待提取至public.js 中  原逻辑错误
function irisValThan(str1,str2,msg)
{		
	var minvalue = $("#"+str1).val();
	var maxvalue = $("#"+str2).val();
	if(minvalue=="")minvalue=0;
	if(maxvalue=="")maxvalue=0;
	if(parseFloat(maxvalue)<parseFloat(minvalue))
	{
		if(msg=="")
		{
			msg = strTitle+$("#"+str2).attr("label")+"不能小于"+$("#"+str1).attr("label");
		} 
		irisValaddMsg(msg);
		return false;
	}
	return true;
}
function checkSubmitPsn(tableId){
	var tr=$("#"+tableId+" :radio:checked").parents("tr");
	if(tr.length!=0 && tr.get(0).rowIndex==2){
		scmWarn('如果您需要修改申请人信息， 请保存申请书后点击菜单“管理”>“个人信息维护”完成修改');
		return false;
	}
	return true;
		
}
</script>